<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMultiDeviceLoginTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('multiDeviceLogin', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('uid')->comment('userAdm主键');
            $table->string('mobile')->comment('手机号');
            $table->string('idfa')->comment('ipad唯一标识');
            $table->string('token')->comment('token');
            $table->tinyInteger('type')->default(2)->comment('1为ipad,2为PC');
            $table->integer('createdAt')->comment('创建时间');
            $table->integer('validity')->comment('过期时间');
        });
        DB::statement("ALTER TABLE `multiDeviceLogin` comment '多设备登录'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
